import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'
const routes = [
  {path: '/', component: () => import('@/views/login/Login.vue')},
  {path: '/Login', component: () => import('@/views/login/Login.vue')},
  {
    path: '/iotHome', redirect: '/Home', component: () => import('@/views/home/iotHome.vue'),
    children: [
      {
        path: '/Home',
        meta: {title: '首页'},
        component: () => import('@/views/home/Home.vue'), // 跳转首页
      },
      {
        path: '/SettingsManage',
        meta: {title: '管理机配置管理'},
        component: () => import('@/views/iotMenu/SettingsManage.vue'), // 跳转首页
      },
    ],
  },
  {
    path: '/LogView',
    name:'LogView',
    meta: {title: '日志监视'},
    component: () => import('@/views/iotMenu/LogView.vue'), // 跳转监视大屏一配置
  },
]
const router = createRouter({
  history: createWebHistory(),
  routes, // `routes: routes` 的缩写
})
export default router